Skip to content

Conversation

@allenss-amazon
Copy link
Member

@allenss-amazon allenss-amazon commented Nov 3, 2025

Restructures the integration of FT.AGGREATE. Now, FT.AGGREGATE and FT.SEARCH are derived from a common class "QueryCommand". This allows sharing of common code between the two commands, with virtual functions for handling per-command specific functions.

@allenss-amazon allenss-amazon changed the title Aggregate testing Aggregate Cleanup Nov 6, 2025
@allenss-amazon allenss-amazon requested a review from boda26 November 6, 2025 17:57
@allenss-amazon allenss-amazon marked this pull request as ready for review November 6, 2025 17:57
ForceReplicasOnly.GetValue()
? query::fanout::FanoutTargetMode::kReplicasOnly
: query::fanout::FanoutTargetMode::kRandom;
auto search_targets = query::fanout::GetSearchTargetsForFanout(ctx, mode);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is using the old code in fanout_template.h. With the new cluster map, this can be replaced by ValkeySearch()::Instance().GetClusterMap()->GetRandomTargets()/GetReplicaTargets(). A switch clause might be needed here to determine the get target mode.
If the ctx is valid here (which I think should be the case), we should use ValkeySearch()::Instance().GetOrRefreshClusterMap()

@allenss-amazon allenss-amazon merged commit e320a56 into valkey-io:main Nov 7, 2025
9 checks passed
@allenss-amazon allenss-amazon deleted the aggregate-testing branch November 7, 2025 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants